package com.yuntsg.subject_database.entity;

import com.baidu.bjf.remoting.protobuf.annotation.ProtobufClass;
import lombok.Data;

import java.io.Serializable;
import java.util.*;

public class PublicEntity {

    @Data
    public static class PageInfo {
        Integer from;
        Integer to;

        public PageInfo() {
        }

        public PageInfo(Integer from, Integer to) {
            this.from = from;
            this.to = to;
        }
    }

    @ProtobufClass
    @Data
    public static class AuthUnitInfoAndCode {
        private AuthUnitInfo authUnitInfo = new AuthUnitInfo();
        private String dateName = "";
        private int dataAutoId = 0;
    }

    @ProtobufClass
    @Data
    //最终结果的实体类
    public static class AuthUnitInfo {
        private List<authInfo> auth = new ArrayList<>();
        private Set<String> unit = new HashSet<>();
        private Double state = 0.0;
    }

    @ProtobufClass
    @Data
    //最终结果的细节实体类
    public static class authInfo {
        private String auth = "";
        private String cnAu = "";
        private List<String> mail = new ArrayList<>();
        private Map<String, detailedInfo> detailedInfo = new LinkedHashMap<>();
        private Integer equal = 0;
    }

    @ProtobufClass
    @Data
    public static class detailedInfo {
        private String str = "";
        private Set<String> hosp = new HashSet<>();
        private Set<String> univ = new HashSet<>();
        private Set<String> coll = new HashSet<>();
        private Set<String> dept = new HashSet<>();
        private Set<String> post = new HashSet<>();
        private Set<String> road = new HashSet<>();
        private List<String> unknown = new ArrayList<>();
        private String country = "";
        private String prov = "";
        private String city = "";
        private String lang = "";
        private String code = "";
    }

    @Data
    public static class SearchEntity {
        private List<String> ads = new ArrayList<>();
        private List<String> jourids = new ArrayList<>();
        private List<String> pmids = new ArrayList<>();
        private String specialist = "";
        private String paramYear = "";
        private String code = "";
        private String rekey;
    }

    // 结果表中的字段
    @Data
    public static class TableField {
        private String key = "";
        private String value = "";
        private String type = "";
        private String code = "";
        private Double score = 0.0;
        private Integer paperNum = 0;
        private Integer rank = 0;
        private String specialist = "";
        private Integer jourId = 0;
        private String info = "";
        private String aidList = "";

    }

    @Data
    public static class EnAuthAndCnAuth {
        private String enAuth = "";
        private String cnAuth = "";
    }


    // 其它，排名
    @Data
    public static class TypeAndRank implements Serializable {
        private static final long serialVersionUID = 1L;

        private String code = "";
        private String type = "";
        private String specialist = "";
        private Integer rank = 0;
        private Integer jid = 0;
    }

    // 基金的名称，包括一级名称和二级名称。
    @ProtobufClass
    @Data
    public static class TopLower {
        private String top = "";
        private String lower = "";
        private Set<String> anyContain = new HashSet<>();//单位信息中包含本字段中的任何一个均可，多个用英文"|"隔开。
        private Set<String> mustExclude = new HashSet<>();//必须排除，单位信息中不能包含本字段中的任一个，多个用英文"|"隔开。
    }

    @Data
    public static class StrAndStr {
        private String key = "";
        private String value = "";
    }


}
